// Vehicle Signal Specification
const vssList = [
  {
    title: 'Cabin.Door.Row1.Left.IsOpen',
    subTile: 'vehicle',
    tag: 'ACTUATOR',
    tagClass: 'actuator',  //actuator \sensor\branch
    imgUrl: 'static/public/cardoorsplitrear-1.svg',
    desc: 'Is door open or closed.',
    code: `# set door open\nVehicle.Cabin.Door.Row1.Left.IsOpen.set(True)`
  },
  {
    title: 'Cabin.Door.Row1.Left.IsLocked',
    subTile: 'vehicle',
    tag: 'ACTUATOR',
    tagClass: 'actuator',
    imgUrl: 'static/public/cardoorsplitrear-1.svg',
    desc: 'Is door locked or unlocked. True = Locked. False = Unlocked.',
    code: `# set door close\nVehicle.Cabin.Door.Row1.Left.IsLocked.set(True)`
  },
  {
    title: 'Cabin.Seat.Row1.Pos1.Position',
    subTile: 'vehicle',
    tag: 'ACTUATOR',
    tagClass: 'actuator',
    imgUrl: 'static/public/cardoorsplitrear-3.svg',
    desc: 'Seat position on vehicle x-axis. Position is relative to the frontmost position supported by the seat. 0 = Frontmost position supported.',
    code: `# set seat position forward\nVehicle.Cabin.Seat.Row1.Pos1.Position.set(1)\n\n# set seat position backward\nVehicle.Cabin.Seat.Row1.Pos1.Position.set(-1)`
  },
  {
    title: 'Cabin.Seat.Row1.Pos1.Height',
    subTile: 'vehicle',
    tag: 'ACTUATOR',
    tagClass: 'actuator',
    imgUrl: 'static/public/cardoorsplitrear-3.svg',
    desc: 'Seat position on vehicle z-axis. Position is relative within available movable range of the seating. 0 = Lowermost position supported.',
    code: `# increase seat height\nVehicle.Cabin.Seat.Row1.Pos1.Height.set(1)\n\n# lower seat height\nVehicle.Cabin.Seat.Row1.Pos1.Height.set(-1)`
  },
  {
    title: 'Cabin.Seat.Row1.Pos1.Backrest.Recline',
    subTile: 'vehicle',
    tag: 'ACTUATOR',
    tagClass: 'actuator',
    imgUrl: 'static/public/cardoorsplitrear-3.svg',
    desc: 'Backrest recline compared to seat z-axis (seat vertical axis). 0 degrees = Upright/Vertical backrest. Negative degrees for forward recline. Positive degrees for backward recline.',
    code: `# set backrest recline forward\nVehicle.Cabin.Seat.Row1.Pos1.Backrest.Recline.set(1)\n\n# set backrest recline backward\nVehicle.Cabin.Seat.Row1.Pos1.Backrest.Recline.set(-1)`
  },
  {
    title: 'Cabin.Lights.AmbientLight',
    subTile: 'vehicle',
    tag: 'SENSOR',
    tagClass: 'sensor',
    imgUrl: 'static/public/carfrontlightinside-1.svg',
    desc: 'How much ambient light is detected in cabin. 0 = No ambient light. 100 = Full brightness',
    code: `# ambient light turn yellow\nVehicle.Cabin.Lights.AmbientLight.set(1)\n\n# ambient light turn green\nVehicle.Cabin.Lights.AmbientLight.set(2)`
  },
  {
    title: 'Cabin.Lights.IsDomeOn',
    subTile: 'vehicle',
    tag: 'ACTUATOR',
    tagClass: 'actuator',
    imgUrl: 'static/public/carfrontlightinside-1.svg',
    desc: 'Is central dome light light on',
    code: `# central dome light light on\nVehicle.Cabin.Lights.IsDomeOn.set(True)\n\n# central dome light light off\nVehicle.Cabin.Lights.IsDomeOn.set(False)`
  },
  {
    title: 'Body.Lights.Running.IsOn',
    subTile: 'vehicle',
    tag: 'ACTUATOR',
    tagClass: 'actuator',
    imgUrl: 'static/public/cardoorsplitrear-1.svg',
    desc: 'Indicates if light is on or off. True = On. False = Off.',
    code: `# front light turn on\nVehicle.Body.Lights.Running.IsOn.set(True)\n\n# front light turn off\nVehicle.Body.Lights.Running.IsOn.set(False)`
  },
  {
    title: 'Body.Lights.Brake.IsActive',
    subTile: 'vehicle',
    tag: 'ACTUATOR',
    tagClass: 'actuator',
    imgUrl: 'static/public/carlighttrunk-1.svg',
    desc: 'Indicates if break-light is active. INACTIVE means lights are off. ACTIVE means lights are on. ADAPTIVE means that break-light is indicating emergency-breaking.',
    code: `# brake light turn on\nVehicle.Body.Lights.Brake.IsActive.set(True)\n\n# brake light turn off\nVehicle.Body.Lights.Brake.IsActive.set(False)`
  },
  {
    title: 'Body.Windshield.Front.Wiping.Mode',
    subTile: 'vehicle',
    tag: 'ACTUATOR',
    tagClass: 'actuator',
    imgUrl: 'static/public/cardoorsplitrear-1.svg',
    desc: 'Wiper mode requested by user/driver. INTERVAL indicates intermittent wiping, with fixed time interval between each wipe. RAIN_SENSOR indicates intermittent wiping based on rain intensity.',
    code: `# trigger front wiper on or off\nVehicle.Body.Windshield.Front.Wiping.Mode.set('TRIGGER')`
  }
]


function createVSS () {
  let htmlStr = ''
  vssList.forEach(item => {
    const vssHtmlStr = `
    <div class="vss-item">
      <div class='tag ${item.tagClass}'>${item.tag}</div>
      <img src='${item.imgUrl}' >
      <div class='title'>${item.title}</div>
      <div class='desc'>${item.subTile}</div>
    </div>
    `
    htmlStr += vssHtmlStr
  })

  document.getElementById('vssList').innerHTML = htmlStr
}

createVSS()